package cn.com.roy.thread.t3_1_3.test2;

public class MyThread2 extends Thread{
    private Object lock;
    public MyThread2(Object lock){
        this.lock = lock;
    }

    @Override
    public void run() {
        super.run();
        try {
            synchronized (lock){
                System.out.println("notify begine: "+System.currentTimeMillis());
                lock.notify();
                System.out.println("notify end:" + System.currentTimeMillis());
            }
        }catch (Exception e){
            e.printStackTrace();
        }

    }
}
